package pw.archipelag.loaderGame.panel.scores {
	import flash.display.Shape;
	import pw.archipelag.loaderGame.interfaceGame.skinsPanel.SkinScores;
	import com.greensock.TweenMax;
	import com.nuke.utils.Draw;

	public class ItemScoreLine extends ItemScoreAbstract {
		
		private var lineDot: Shape;
		private var gapDotSize: Number;
		private var colorDot: uint;
		
		public function ItemScoreLine(isEvenOdd: uint): void {
			super(isEvenOdd);
			this.createLineDot();
		}

		private function createLineDot(): void {
			this.lineDot = new Shape();
			this.addChild(this.lineDot);
		}
		
		override public function draw(skinScores: SkinScores): void {
			this.gapDotSize = uint(skinScores.skinTf.tFormat.size) / 6
			this.colorDot = uint(skinScores.skinTf.tFormat.color);
			this.width = ItemScoreAbstract.WIDTH;
			TweenMax.to(this.lineDot, 0, skinScores.skinTf.objTween);
			super.draw(skinScores);
		}
		
		override public function set width(value: Number): void {
			this.lineDot.graphics.clear();
			Draw.dotLine(this.lineDot, value, ItemScoreAbstract.HEIGHT / 2, 0, ItemScoreAbstract.HEIGHT / 2, this.colorDot, 1, this.gapDotSize, this.gapDotSize);
			this.bg.width = value;
		}
		
	}

}